<?php
namespace app\common\utils;

use app\common\VO\ResultVO;

/**
 * 展示层数据助手类
 */
class ResultVOUtil
{
    public static function success($data){
        $result = new ResultVO(0, '成功', $data);
        return $result;
    }
    
    public static function error($param=null,$msg=null) {

        if(is_array($param)){
            $result = new ResultVO($param['code'], $param['msg'], '');  
        }else {
            $result = new ResultVO($param, $msg, '');   
        }
        return $result;
    }
}

